package com.lwq.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.lwq.constants.ScheduleConstants;
import com.lwq.model.BaseEntity;
import lombok.Data;

import java.io.Serializable;

/**
 * Description:
 * Author: LiuWenQing
 * Datetime: 2021/6/16
 */
@Data
@TableName(value="sys_task",schema = "transit")
public class SysTask extends BaseEntity implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(type = IdType.ASSIGN_ID)
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;

    private String name;

    private String cron;

    /**
     * 0=默认,1=立即触发执行,2=触发一次执行,3=不触发立即执行
     */
    private String misfirePolicy = ScheduleConstants.MISFIRE_DEFAULT;

    /**
     *0=允许,1=禁止
     */
    private String concurrent;

    /**
     *任务状态（0正常 1暂停）
     */
    private String status;

    /**
     * 调用目标字符串
     */
    private String invokeTarget;

}
